package jdk5.generic;

import jdk5.common.Graduate;
import static java.lang.System.out;
import static jdk5.generic.GroupMgmt.mkDate;

public class StudentAgeComparatorTest {
	public static void main(String[] args) {
		Graduate gzhu = new Graduate("George", "Male", mkDate(1968, 3, 21));
		Graduate larry = new Graduate("Larry", "Male", mkDate(1964, 8, 10));
		StudentAgeComparator<Graduate> comp = new StudentAgeComparator<Graduate>();
		int result = comp.compare(gzhu, larry);
		out.println(result >= 0 ? "George is older than Larry"
				: "George is younger than Larry");
	}
}